<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <title>编辑</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/js/commons/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/commons/base.css" media="all">
</head>
<body>
<form id="dataForm" name="dataForm" lay-filter="dataForm" class="layui-form layui-form-pane" style="padding: 15px 0px 15px 15px">
    <input type="hidden" id="id" name="id" th:value="${res.id}" />
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label required">名称</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" lay-verify="required" id="resName" name="resName" autocomplete="off" th:value="${res.resName}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label required">CODE</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" lay-verify="required" id="resCode" name="resCode" autocomplete="off" disabled="" th:value="${res.resCode}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label required">类型</label>
            <div class="layui-input-inline">
                <select class="layui-select" lay-verify="required" id="type" name="type" autocomplete="off" th:value="${res.type}">
                    <option value="">请选择</option>
                    <option value="0" th:selected="${0 == res.type}">菜单</option>
                    <option value="1" th:selected="${1 == res.type}">按钮</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label required">父级权限</label>
            <div class="layui-input-inline">
                <input type="hidden" id="pid" name="pid" th:value="${res.pid}">
                <input type="hidden" id="pcode" name="pcode" th:value="${res.pcode}">
                <input type="text" class="layui-input" lay-verify="required" id="pname" name="pname" autocomplete="off" th:value="${res.pname}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">URL</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="url" name="url" autocomplete="off" th:value="${res.url}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="number" class="layui-input" id="sort" name="sort" autocomplete="off" th:value="${res.sort}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">图标</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="icon" name="icon" autocomplete="off" th:value="${res.icon}">
            </div>
        </div>
    </div>
    <button type="button" class="layui-btn" lay-filter="submitBtn" style="display:none;" lay-submit="" id="submitBtn" name="submitBtn">保存</button>
</form>
</body>
</html>
<script charset="utf-8" src="/js/commons/layui/layui.all.js" ></script>
<script charset="utf-8" src="/js/commons/jquery.js"></script>
<script src="/js/mng/system/res_edit.js"></script>